/**
 * Copyright (c) 2006 Amgad S Youssef
 * All Rights Reserved.
 * Licensed under the Eclipse Public License - v 1.0
 * For more information see http://www.eclipse.org/legal/epl-v10.html
 */
package org.eclipsejcde.jctools.actions;

import org.eclipse.jface.action.IAction;
import org.eclipse.jface.preference.PreferenceDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
import org.eclipse.ui.dialogs.PreferencesUtil;

/**
 * @author Amgad S Youssef
 *
 */
public class OpenJavacardPreferences implements IObjectActionDelegate, IWorkbenchWindowActionDelegate {

	@Override
	public void run(IAction action) {
		PreferenceDialog pd = PreferencesUtil.createPreferenceDialogOn(new Shell(), "org.eclipsejcde.preferences.pages.JCHomeLocationPage", new String[] {
				"org.eclipsejcde.preferences.pages.JCHomeLocationPage", "org.eclipsejcde.preferences.pages.CREFPreferences", "org.eclipsejcde.preferences.pages.ConverterPreferences",
				"org.eclipsejcde.preferences.pages.JCWDEPreferences" }, null);
		pd.open();
	}

	@Override
	public void selectionChanged(IAction action, ISelection selection) {
		// TODO Auto-generated method stub

	}

	@Override
	public void setActivePart(IAction action, IWorkbenchPart targetPart) {
		// TODO Auto-generated method stub

	}

	@Override
	public void dispose() {
		// TODO Auto-generated method stub

	}

	@Override
	public void init(IWorkbenchWindow window) {
		// TODO Auto-generated method stub

	}

}
